from django.urls import path
from . import views
from django.views.generic.base import RedirectView
app_name='myapp'

urlpatterns = [
    path('', views.hello_world, name='hello_world'),
    path('sum/<int:num1>/<int:num2>/', views.sum, name='sum'),
    path('post-<int:post_id>/', views.post, name='post'),
    # path('redirect/',views.redirect_view,name='redirect_view'),
    path('redirect-to-home/',RedirectView.as_view(url='/',permanent=True),name='redirect_to_home'),
    path('redirect-view/',views.redirect_view,name='redirect_view')
]